/*
 * Sylvain BERTRAND <digital.ragnarok@gmail.com>
 * code protected by GNU GPL v3
 */
#include <X11/Xlib.h>
#include <glib.h>
#include <libxml/xinclude.h>
#include "../../toolkit/xml.h"
#include "../../toolkit/keyboard.h"
#include "../misc.h"
#include "../geom.h"
#include "../frame.h"
#include "../actions.h"
struct options {
	gchar *str;
};

static gpointer setup_func(xmlNodePtr node)
{
	xmlNodePtr n;
	struct options *o;
	o = g_slice_new0(struct options);
	if((n = t_xml_find_node(node, "string")))
		o->str = t_xml_node_string(n);
	return o;
}

static void free_func(gpointer options)
{
	struct options *o = options;
	g_free(o->str);
	g_slice_free(struct options, o);
}

static gboolean run_func(struct wm_actions_data *data, gpointer options)
{
	struct options *o = options;
	(void)data;
	if(o->str)
		g_print("%s\n", o->str);
	return FALSE;
}

void action_debug_startup(void)
{
	actions_register("Debug", setup_func, free_func, run_func);
}
